package com.duniptech.engine.core.modeling.api;

import java.io.Serializable;

/**
 * <P>Interface for connections among the components of this coupled model.</P>
 * <P>A connection of a DEVS coupled model is defined by four identifiers. These are:
 * <UL>
 * <LI>The name of the component from where the connection comes.</LI>
 * <LI>The name of the port from where the connectio comes.</LI>
 * <LI>The name of the component to where the connection goes.</LI>
 * <LI>The name of the port to where the connection goes.</LI>
 * </UL>
 * </P>
 * 
 * @author Jos� Luis Risco Mart�n.
 */
public interface ICoupling extends Serializable {
	/**
	 * Returns the component from where the connection comes.
	 * @return The component from where the connection comes.
	 */
	public IAtomic getComponentFrom();
	/**
	 * Returns the name of the port from where the connectio comes.
	 * @return The name of the port from where the connectio comes.
	 */
	public String getNamePortFrom();
	/**
	 * Returns the component to where the connection goes.
	 * @return The component to where the connection goes.
	 */
	public IAtomic getComponentTo();
	/**
	 * Returns the name of the port to where the connection goes.
	 * @return The name of the port to where the connection goes.
	 */
	public String getNamePortTo();
	/**
	 * Sets the component from where the connection comes.
	 * @param component Component from where the connection comes.
	 */
	public void setComponentFrom(IAtomic component);
	/**
	 * Sets the name of the port from where the connectio comes.
	 * @param portName The name of the port from where the connectio comes.
	 */
	public void setNamePortFrom(String portName);
	/**
	 * Sets the component to where the connection goes.
	 * @param component Component to where the connection goes.
	 */
	public void setComponentTo(IAtomic component);
	/**
	 * Sets the name of the port to where the connection goes.
	 * @param portName The name of the port to where the connection goes.
	 */
	public void setNamePortTo(String portName);
}
